#pragma once

#include "tree.h"

#define TREE_TYPE_NUMS 5

extern const tree_struct_t g_tree_struct_a[TREE_TYPE_NUMS];

// 对外提供：tree_init_ex_oper_num()
// 将树初始化（包括树型也置成初始），但不初始化oper和num的值，
// 对外返回它们的指针，让外部来初始化。
static inline void tree_init_ex_oper_num(tree34_t* tree_p) {
	tree_p->struct_p = g_tree_struct_a;
}

// 对外提供：gen_tree_has_next()
static inline b32_s gen_tree_has_next(const tree34_t* tree_p) {
	return tree_p->struct_p < g_tree_struct_a + TREE_TYPE_NUMS - 1;
}

// 对外提供：gen_tree_next()
static inline void gen_tree_next(tree34_t* tree_p) {
	tree_p->struct_p++;
}
